home *** CD-ROM | disk | FTP | other *** search
/ Digital Background Bonanza / Digital Background Bonanza - Disc 1.iso / pc / DBB1.swf / scripts / __Packages / mx / controls / listclasses / ScrollSelectList.as < prev    next >
Encoding:
Text File  |  2007-03-09  |  20.0 KB  |  729 lines

  1. class mx.controls.listclasses.ScrollSelectList extends mx.core.ScrollView
  2. {
  3.    var invLayoutContent;
  4.    var rows;
  5.    var topRowZ;
  6.    var listContent;
  7.    var __dataProvider;
  8.    var tW;
  9.    var layoutX;
  10.    var layoutY;
  11.    var tH;
  12.    var invRowHeight;
  13.    var __height;
  14.    var invUpdateControl;
  15.    var __cellRenderer;
  16.    var __labelFunction;
  17.    var __iconField;
  18.    var __iconFunction;
  19.    var getLength;
  20.    var baseRowZ;
  21.    var lastPosition;
  22.    var propertyTable;
  23.    var isSelected;
  24.    var wasKeySelected;
  25.    var changeFlag;
  26.    var clearSelected;
  27.    var selectItem;
  28.    var lastSelected;
  29.    var dispatchEvent;
  30.    var dragScrolling;
  31.    var scrollInterval;
  32.    var isPressed;
  33.    var onMouseUp;
  34.    var getSelectedIndex;
  35.    var border_mc;
  36.    static var mixIt1 = mx.controls.listclasses.DataSelector.Initialize(mx.controls.listclasses.ScrollSelectList);
  37.    static var mixIt2 = mx.controls.listclasses.DataProvider.Initialize(Array);
  38.    var CONTENTDEPTH = 100;
  39.    var __hPosition = 0;
  40.    var __rowRenderer = "SelectableRow";
  41.    var __rowHeight = 22;
  42.    var __rowCount = 0;
  43.    var __labelField = "label";
  44.    var minScrollInterval = 30;
  45.    var dropEnabled = false;
  46.    var dragEnabled = false;
  47.    var className = "ScrollSelectList";
  48.    var isRowStyle = {styleName:true,backgroundColor:true,selectionColor:true,rollOverColor:true,selectionDisabledColor:true,backgroundDisabledColor:true,textColor:true,textSelectedColor:true,textRollOverColor:true,textDisabledColor:true,alternatingRowColors:true,defaultIcon:true};
  49.    var roundUp = 0;
  50.    var selectable = true;
  51.    var multipleSelection = false;
  52.    function ScrollSelectList()
  53.    {
  54.       super();
  55.    }
  56.    function layoutContent(x, y, w, h)
  57.    {
  58.       delete this.invLayoutContent;
  59.       var _loc4_ = Math.ceil(h / this.__rowHeight);
  60.       this.roundUp = h % this.__rowHeight != 0;
  61.       var _loc12_ = _loc4_ - this.__rowCount;
  62.       if(_loc12_ < 0)
  63.       {
  64.          var _loc3_ = _loc4_;
  65.          while(_loc3_ < this.__rowCount)
  66.          {
  67.             this.rows[_loc3_].removeMovieClip();
  68.             delete this.rows[_loc3_];
  69.             _loc3_ = _loc3_ + 1;
  70.          }
  71.          this.topRowZ += _loc12_;
  72.       }
  73.       else if(_loc12_ > 0)
  74.       {
  75.          if(this.rows == undefined)
  76.          {
  77.             this.rows = new Array();
  78.          }
  79.          _loc3_ = this.__rowCount;
  80.          while(_loc3_ < _loc4_)
  81.          {
  82.             var _loc0_ = null;
  83.             var _loc2_ = this.rows[_loc3_] = this.listContent.createObject(this.__rowRenderer,"listRow" + this.topRowZ++,this.topRowZ,{owner:this,styleName:this,rowIndex:_loc3_});
  84.             _loc2_._x = x;
  85.             _loc2_._y = Math.round(_loc3_ * this.__rowHeight + y);
  86.             _loc2_.setSize(w,this.__rowHeight);
  87.             _loc2_.drawRow(this.__dataProvider.getItemAt(this.__vPosition + _loc3_),this.getStateAt(this.__vPosition + _loc3_));
  88.             _loc2_.lastY = _loc2_._y;
  89.             _loc3_ = _loc3_ + 1;
  90.          }
  91.       }
  92.       if(w != this.tW)
  93.       {
  94.          var _loc11_ = _loc12_ <= 0 ? _loc4_ : this.__rowCount;
  95.          _loc3_ = 0;
  96.          while(_loc3_ < _loc11_)
  97.          {
  98.             this.rows[_loc3_].setSize(w,this.__rowHeight);
  99.             _loc3_ = _loc3_ + 1;
  100.          }
  101.       }
  102.       if(this.layoutX != x || this.layoutY != y)
  103.       {
  104.          _loc3_ = 0;
  105.          while(_loc3_ < _loc4_)
  106.          {
  107.             this.rows[_loc3_]._x = x;
  108.             this.rows[_loc3_]._y = Math.round(_loc3_ * this.__rowHeight + y);
  109.             _loc3_ = _loc3_ + 1;
  110.          }
  111.       }
  112.       this.__rowCount = _loc4_;
  113.       this.layoutX = x;
  114.       this.layoutY = y;
  115.       this.tW = w;
  116.       this.tH = h;
  117.    }
  118.    function getRowHeight(Void)
  119.    {
  120.       return this.__rowHeight;
  121.    }
  122.    function setRowHeight(v)
  123.    {
  124.       this.__rowHeight = v;
  125.       this.invRowHeight = true;
  126.       this.invalidate();
  127.    }
  128.    function get rowHeight()
  129.    {
  130.       return this.getRowHeight();
  131.    }
  132.    function set rowHeight(w)
  133.    {
  134.       this.setRowHeight(w);
  135.    }
  136.    function setRowCount(v)
  137.    {
  138.       this.__rowCount = v;
  139.    }
  140.    function getRowCount(Void)
  141.    {
  142.       var _loc2_ = this.__rowCount != 0 ? this.__rowCount : Math.ceil(this.__height / this.__rowHeight);
  143.       return _loc2_;
  144.    }
  145.    function get rowCount()
  146.    {
  147.       return this.getRowCount();
  148.    }
  149.    function set rowCount(w)
  150.    {
  151.       this.setRowCount(w);
  152.    }
  153.    function setEnabled(v)
  154.    {
  155.       super.setEnabled(v);
  156.       this.invUpdateControl = true;
  157.       this.invalidate();
  158.    }
  159.    function setCellRenderer(cR)
  160.    {
  161.       this.__cellRenderer = cR;
  162.       var _loc2_ = 0;
  163.       while(_loc2_ < this.rows.length)
  164.       {
  165.          this.rows[_loc2_].setCellRenderer(true);
  166.          _loc2_ = _loc2_ + 1;
  167.       }
  168.       this.invUpdateControl = true;
  169.       this.invalidate();
  170.    }
  171.    function set cellRenderer(cR)
  172.    {
  173.       this.setCellRenderer(cR);
  174.    }
  175.    function get cellRenderer()
  176.    {
  177.       return this.__cellRenderer;
  178.    }
  179.    function set labelField(field)
  180.    {
  181.       this.setLabelField(field);
  182.    }
  183.    function setLabelField(field)
  184.    {
  185.       this.__labelField = field;
  186.       this.invUpdateControl = true;
  187.       this.invalidate();
  188.    }
  189.    function get labelField()
  190.    {
  191.       return this.__labelField;
  192.    }
  193.    function set labelFunction(func)
  194.    {
  195.       this.setLabelFunction(func);
  196.    }
  197.    function setLabelFunction(func)
  198.    {
  199.       this.__labelFunction = func;
  200.       this.invUpdateControl = true;
  201.       this.invalidate();
  202.    }
  203.    function get labelFunction()
  204.    {
  205.       return this.__labelFunction;
  206.    }
  207.    function set iconField(field)
  208.    {
  209.       this.setIconField(field);
  210.    }
  211.    function setIconField(field)
  212.    {
  213.       this.__iconField = field;
  214.       this.invUpdateControl = true;
  215.       this.invalidate();
  216.    }
  217.    function get iconField()
  218.    {
  219.       return this.__iconField;
  220.    }
  221.    function set iconFunction(func)
  222.    {
  223.       this.setIconFunction(func);
  224.    }
  225.    function setIconFunction(func)
  226.    {
  227.       this.__iconFunction = func;
  228.       this.invUpdateControl = true;
  229.       this.invalidate();
  230.    }
  231.    function get iconFunction()
  232.    {
  233.       return this.__iconFunction;
  234.    }
  235.    function setVPosition(pos)
  236.    {
  237.       if(pos < 0)
  238.       {
  239.          return undefined;
  240.       }
  241.       if(pos > 0 && pos > this.getLength() - this.__rowCount + this.roundUp)
  242.       {
  243.          return undefined;
  244.       }
  245.       var _loc8_ = pos - this.__vPosition;
  246.       if(_loc8_ == 0)
  247.       {
  248.          return undefined;
  249.       }
  250.       this.__vPosition = pos;
  251.       var _loc10_ = _loc8_ > 0;
  252.       _loc8_ = Math.abs(_loc8_);
  253.       if(_loc8_ >= this.__rowCount)
  254.       {
  255.          this.updateControl();
  256.       }
  257.       else
  258.       {
  259.          var _loc4_ = new Array();
  260.          var _loc9_ = this.__rowCount - _loc8_;
  261.          var _loc12_ = _loc8_ * this.__rowHeight;
  262.          var _loc11_ = _loc9_ * this.__rowHeight;
  263.          var _loc6_ = !_loc10_ ? -1 : 1;
  264.          var _loc3_ = 0;
  265.          while(_loc3_ < this.__rowCount)
  266.          {
  267.             if(_loc3_ < _loc8_ && _loc10_ || _loc3_ >= _loc9_ && !_loc10_)
  268.             {
  269.                this.rows[_loc3_]._y += Math.round(_loc6_ * _loc11_);
  270.                var _loc5_ = _loc3_ + _loc6_ * _loc9_;
  271.                var _loc7_ = this.__vPosition + _loc5_;
  272.                _loc4_[_loc5_] = this.rows[_loc3_];
  273.                _loc4_[_loc5_].rowIndex = _loc5_;
  274.                _loc4_[_loc5_].drawRow(this.__dataProvider.getItemAt(_loc7_),this.getStateAt(_loc7_),false);
  275.             }
  276.             else
  277.             {
  278.                this.rows[_loc3_]._y -= Math.round(_loc6_ * _loc12_);
  279.                _loc5_ = _loc3_ - _loc6_ * _loc8_;
  280.                _loc4_[_loc5_] = this.rows[_loc3_];
  281.                _loc4_[_loc5_].rowIndex = _loc5_;
  282.             }
  283.             _loc3_ = _loc3_ + 1;
  284.          }
  285.          this.rows = _loc4_;
  286.          _loc3_ = 0;
  287.          while(_loc3_ < this.__rowCount)
  288.          {
  289.             this.rows[_loc3_].swapDepths(this.baseRowZ + _loc3_);
  290.             _loc3_ = _loc3_ + 1;
  291.          }
  292.       }
  293.       this.lastPosition = pos;
  294.       super.setVPosition(pos);
  295.    }
  296.    function setPropertiesAt(index, obj)
  297.    {
  298.       var _loc2_ = this.__dataProvider.getItemID(index);
  299.       if(_loc2_ == undefined)
  300.       {
  301.          return undefined;
  302.       }
  303.       if(this.propertyTable == undefined)
  304.       {
  305.          this.propertyTable = new Object();
  306.       }
  307.       this.propertyTable[_loc2_] = obj;
  308.       this.rows[index - this.__vPosition].drawRow(this.__dataProvider.getItemAt(index),this.getStateAt(index));
  309.    }
  310.    function getPropertiesAt(index)
  311.    {
  312.       var _loc2_ = this.__dataProvider.getItemID(index);
  313.       if(_loc2_ == undefined)
  314.       {
  315.          return undefined;
  316.       }
  317.       return this.propertyTable[_loc2_];
  318.    }
  319.    function getPropertiesOf(obj)
  320.    {
  321.       var _loc2_ = obj.getID();
  322.       if(_loc2_ == undefined)
  323.       {
  324.          return undefined;
  325.       }
  326.       return this.propertyTable[_loc2_];
  327.    }
  328.    function getStyle(styleProp)
  329.    {
  330.       var _loc2_ = super.getStyle(styleProp);
  331.       var _loc3_ = mx.styles.StyleManager.colorNames[_loc2_];
  332.       if(_loc3_ != undefined)
  333.       {
  334.          _loc2_ = _loc3_;
  335.       }
  336.       return _loc2_;
  337.    }
  338.    function updateControl(Void)
  339.    {
  340.       var _loc2_ = 0;
  341.       while(_loc2_ < this.__rowCount)
  342.       {
  343.          this.rows[_loc2_].drawRow(this.__dataProvider.getItemAt(_loc2_ + this.__vPosition),this.getStateAt(_loc2_ + this.__vPosition));
  344.          _loc2_ = _loc2_ + 1;
  345.       }
  346.       delete this.invUpdateControl;
  347.    }
  348.    function getStateAt(index)
  349.    {
  350.       return !this.isSelected(index) ? "normal" : "selected";
  351.    }
  352.    function selectRow(rowIndex, transition, allowChangeEvent)
  353.    {
  354.       if(!this.selectable)
  355.       {
  356.          return undefined;
  357.       }
  358.       var _loc3_ = this.__vPosition + rowIndex;
  359.       var _loc8_ = this.__dataProvider.getItemAt(_loc3_);
  360.       var _loc5_ = this.rows[rowIndex];
  361.       if(_loc8_ == undefined)
  362.       {
  363.          return undefined;
  364.       }
  365.       if(transition == undefined)
  366.       {
  367.          transition = true;
  368.       }
  369.       if(allowChangeEvent == undefined)
  370.       {
  371.          allowChangeEvent = this.wasKeySelected;
  372.       }
  373.       this.changeFlag = true;
  374.       if(!this.multipleSelection && !Key.isDown(17) || !Key.isDown(16) && !Key.isDown(17))
  375.       {
  376.          this.clearSelected(transition);
  377.          this.selectItem(_loc3_,true);
  378.          this.lastSelected = _loc3_;
  379.          _loc5_.drawRow(_loc5_.item,this.getStateAt(_loc3_),transition);
  380.       }
  381.       else if(Key.isDown(16) && this.multipleSelection)
  382.       {
  383.          if(this.lastSelected == undefined)
  384.          {
  385.             this.lastSelected = _loc3_;
  386.          }
  387.          var _loc4_ = this.lastSelected >= _loc3_ ? -1 : 1;
  388.          this.clearSelected(false);
  389.          var _loc2_ = this.lastSelected;
  390.          while(_loc2_ != _loc3_)
  391.          {
  392.             this.selectItem(_loc2_,true);
  393.             if(_loc2_ >= this.__vPosition && _loc2_ < this.__vPosition + this.__rowCount)
  394.             {
  395.                this.rows[_loc2_ - this.__vPosition].drawRow(this.rows[_loc2_ - this.__vPosition].item,"selected",false);
  396.             }
  397.             _loc2_ += _loc4_;
  398.          }
  399.          this.selectItem(_loc3_,true);
  400.          _loc5_.drawRow(_loc5_.item,"selected",transition);
  401.       }
  402.       else if(Key.isDown(17))
  403.       {
  404.          var _loc7_ = this.isSelected(_loc3_);
  405.          if(!this.multipleSelection || this.wasKeySelected)
  406.          {
  407.             this.clearSelected(transition);
  408.          }
  409.          if(!(!this.multipleSelection && _loc7_))
  410.          {
  411.             this.selectItem(_loc3_,!_loc7_);
  412.             var _loc9_ = !!_loc7_ ? "normal" : "selected";
  413.             _loc5_.drawRow(_loc5_.item,_loc9_,transition);
  414.          }
  415.          this.lastSelected = _loc3_;
  416.       }
  417.       if(allowChangeEvent)
  418.       {
  419.          this.dispatchEvent({type:"change"});
  420.       }
  421.       delete this.wasKeySelected;
  422.    }
  423.    function dragScroll(Void)
  424.    {
  425.       clearInterval(this.dragScrolling);
  426.       if(this._ymouse < 0)
  427.       {
  428.          this.setVPosition(this.__vPosition - 1);
  429.          this.selectRow(0,false);
  430.          var _loc2_ = Math.min(- this._ymouse - 30,0);
  431.          this.scrollInterval = 0.593 * _loc2_ * _loc2_ + 1 + this.minScrollInterval;
  432.          this.dragScrolling = setInterval(this,"dragScroll",this.scrollInterval);
  433.          this.dispatchEvent({type:"scroll",direction:"vertical",position:this.__vPosition});
  434.       }
  435.       else if(this._ymouse > this.__height)
  436.       {
  437.          var _loc3_ = this.__vPosition;
  438.          this.setVPosition(this.__vPosition + 1);
  439.          if(_loc3_ != this.__vPosition)
  440.          {
  441.             this.selectRow(this.__rowCount - 1 - this.roundUp,false);
  442.          }
  443.          _loc2_ = Math.min(this._ymouse - this.__height - 30,0);
  444.          this.scrollInterval = 0.593 * _loc2_ * _loc2_ + 1 + this.minScrollInterval;
  445.          this.dragScrolling = setInterval(this,"dragScroll",this.scrollInterval);
  446.          this.dispatchEvent({type:"scroll",direction:"vertical",position:this.__vPosition});
  447.       }
  448.       else
  449.       {
  450.          this.dragScrolling = setInterval(this,"dragScroll",15);
  451.       }
  452.       updateAfterEvent();
  453.    }
  454.    function __onMouseUp(Void)
  455.    {
  456.       clearInterval(this.dragScrolling);
  457.       delete this.dragScrolling;
  458.       delete this.dragScrolling;
  459.       delete this.isPressed;
  460.       delete this.onMouseUp;
  461.       if(!this.selectable)
  462.       {
  463.          return undefined;
  464.       }
  465.       if(this.changeFlag)
  466.       {
  467.          this.dispatchEvent({type:"change"});
  468.       }
  469.       delete this.changeFlag;
  470.    }
  471.    function moveSelBy(incr)
  472.    {
  473.       if(!this.selectable)
  474.       {
  475.          this.setVPosition(this.__vPosition + incr);
  476.          return undefined;
  477.       }
  478.       var _loc3_ = this.getSelectedIndex();
  479.       if(_loc3_ == undefined)
  480.       {
  481.          _loc3_ = -1;
  482.       }
  483.       var _loc2_ = _loc3_ + incr;
  484.       _loc2_ = Math.max(0,_loc2_);
  485.       _loc2_ = Math.min(this.getLength() - 1,_loc2_);
  486.       if(_loc2_ == _loc3_)
  487.       {
  488.          return undefined;
  489.       }
  490.       if(_loc3_ < this.__vPosition || _loc3_ >= this.__vPosition + this.__rowCount)
  491.       {
  492.          this.setVPosition(_loc3_);
  493.       }
  494.       if(_loc2_ >= this.__vPosition + this.__rowCount - this.roundUp || _loc2_ < this.__vPosition)
  495.       {
  496.          this.setVPosition(this.__vPosition + incr);
  497.       }
  498.       this.wasKeySelected = true;
  499.       this.selectRow(_loc2_ - this.__vPosition,false);
  500.    }
  501.    function keyDown(e)
  502.    {
  503.       if(this.selectable)
  504.       {
  505.          if(this.findInputText())
  506.          {
  507.             return undefined;
  508.          }
  509.       }
  510.       if(e.code == 40)
  511.       {
  512.          this.moveSelBy(1);
  513.       }
  514.       else if(e.code == 38)
  515.       {
  516.          this.moveSelBy(-1);
  517.       }
  518.       else if(e.code == 34)
  519.       {
  520.          if(this.selectable)
  521.          {
  522.             var _loc3_ = this.getSelectedIndex();
  523.             if(_loc3_ == undefined)
  524.             {
  525.                _loc3_ = 0;
  526.             }
  527.             this.setVPosition(_loc3_);
  528.          }
  529.          this.moveSelBy(this.__rowCount - 1 - this.roundUp);
  530.       }
  531.       else if(e.code == 33)
  532.       {
  533.          if(this.selectable)
  534.          {
  535.             _loc3_ = this.getSelectedIndex();
  536.             if(_loc3_ == undefined)
  537.             {
  538.                _loc3_ = 0;
  539.             }
  540.             this.setVPosition(_loc3_);
  541.          }
  542.          this.moveSelBy(1 - this.__rowCount + this.roundUp);
  543.       }
  544.       else if(e.code == 36)
  545.       {
  546.          this.moveSelBy(- this.__dataProvider.length);
  547.       }
  548.       else if(e.code == 35)
  549.       {
  550.          this.moveSelBy(this.__dataProvider.length);
  551.       }
  552.    }
  553.    function findInputText(Void)
  554.    {
  555.       var _loc2_ = Key.getAscii();
  556.       if(_loc2_ >= 33 && _loc2_ <= 126)
  557.       {
  558.          this.findString(String.fromCharCode(_loc2_));
  559.          return true;
  560.       }
  561.    }
  562.    function findString(str)
  563.    {
  564.       if(this.__dataProvider.length == 0)
  565.       {
  566.          return undefined;
  567.       }
  568.       var _loc4_ = this.getSelectedIndex();
  569.       if(_loc4_ == undefined)
  570.       {
  571.          _loc4_ = 0;
  572.       }
  573.       var _loc6_ = 0;
  574.       var _loc3_ = _loc4_ + 1;
  575.       while(_loc3_ != _loc4_)
  576.       {
  577.          var _loc2_ = this.__dataProvider.getItemAt(_loc3_);
  578.          if(_loc2_ instanceof XMLNode)
  579.          {
  580.             _loc2_ = _loc2_.attributes[this.__labelField];
  581.          }
  582.          else if(typeof _loc2_ != "string")
  583.          {
  584.             _loc2_ = String(_loc2_[this.__labelField]);
  585.          }
  586.          _loc2_ = _loc2_.substring(0,str.length);
  587.          if(str == _loc2_ || str.toUpperCase() == _loc2_.toUpperCase())
  588.          {
  589.             _loc6_ = _loc3_ - _loc4_;
  590.             break;
  591.          }
  592.          if(_loc3_ >= this.getLength() - 1)
  593.          {
  594.             _loc3_ = -1;
  595.          }
  596.          _loc3_ = _loc3_ + 1;
  597.       }
  598.       if(_loc6_ != 0)
  599.       {
  600.          this.moveSelBy(_loc6_);
  601.       }
  602.    }
  603.    function onRowPress(rowIndex)
  604.    {
  605.       if(!this.enabled)
  606.       {
  607.          return undefined;
  608.       }
  609.       this.isPressed = true;
  610.       this.dragScrolling = setInterval(this,"dragScroll",15);
  611.       this.onMouseUp = this.__onMouseUp;
  612.       if(!this.selectable)
  613.       {
  614.          return undefined;
  615.       }
  616.       this.selectRow(rowIndex);
  617.    }
  618.    function onRowRelease(rowIndex)
  619.    {
  620.    }
  621.    function onRowRollOver(rowIndex)
  622.    {
  623.       if(!this.enabled)
  624.       {
  625.          return undefined;
  626.       }
  627.       var _loc2_ = this.rows[rowIndex].item;
  628.       if(this.getStyle("useRollOver") && _loc2_ != undefined)
  629.       {
  630.          this.rows[rowIndex].drawRow(_loc2_,"highlighted",false);
  631.       }
  632.       this.dispatchEvent({type:"itemRollOver",index:rowIndex + this.__vPosition});
  633.    }
  634.    function onRowRollOut(rowIndex)
  635.    {
  636.       if(!this.enabled)
  637.       {
  638.          return undefined;
  639.       }
  640.       if(this.getStyle("useRollOver"))
  641.       {
  642.          this.rows[rowIndex].drawRow(this.rows[rowIndex].item,this.getStateAt(rowIndex + this.__vPosition),false);
  643.       }
  644.       this.dispatchEvent({type:"itemRollOut",index:rowIndex + this.__vPosition});
  645.    }
  646.    function onRowDragOver(rowIndex)
  647.    {
  648.       if(!this.enabled || this.isPressed != true || !this.selectable)
  649.       {
  650.          return undefined;
  651.       }
  652.       if(!this.dropEnabled)
  653.       {
  654.          if(this.dragScrolling)
  655.          {
  656.             this.selectRow(rowIndex,false);
  657.          }
  658.          else
  659.          {
  660.             this.onMouseUp = this.__onMouseUp;
  661.             this.onRowPress(rowIndex);
  662.          }
  663.       }
  664.    }
  665.    function onRowDragOut(rowIndex)
  666.    {
  667.       if(!this.enabled)
  668.       {
  669.          return undefined;
  670.       }
  671.       if(!this.dragEnabled)
  672.       {
  673.          this.onRowRollOut(rowIndex);
  674.       }
  675.    }
  676.    function init(Void)
  677.    {
  678.       super.init();
  679.       this.tabEnabled = true;
  680.       this.tabChildren = false;
  681.       if(this.__dataProvider == undefined)
  682.       {
  683.          this.__dataProvider = new Array();
  684.          this.__dataProvider.addEventListener("modelChanged",this);
  685.       }
  686.       this.baseRowZ = this.topRowZ = 10;
  687.    }
  688.    function createChildren(Void)
  689.    {
  690.       super.createChildren();
  691.       this.listContent = this.createEmptyMovieClip("content_mc",this.CONTENTDEPTH);
  692.       this.invLayoutContent = true;
  693.       this.invalidate();
  694.    }
  695.    function draw(Void)
  696.    {
  697.       if(this.invRowHeight)
  698.       {
  699.          delete this.invRowHeight;
  700.          this.__rowCount = 0;
  701.          this.listContent.removeMovieClip();
  702.          this.listContent = this.createEmptyMovieClip("content_mc",this.CONTENTDEPTH);
  703.       }
  704.       if(this.invUpdateControl)
  705.       {
  706.          this.updateControl();
  707.       }
  708.       this.border_mc.draw();
  709.    }
  710.    function invalidateStyle(propName)
  711.    {
  712.       if(this.isRowStyle[propName])
  713.       {
  714.          this.invUpdateControl = true;
  715.          this.invalidate();
  716.       }
  717.       else
  718.       {
  719.          var _loc3_ = 0;
  720.          while(_loc3_ < this.__rowCount)
  721.          {
  722.             this.rows[_loc3_].invalidateStyle(propName);
  723.             _loc3_ = _loc3_ + 1;
  724.          }
  725.       }
  726.       super.invalidateStyle(propName);
  727.    }
  728. }
  729.